import {homeCate} from "../../utils/api"
export const state={
    list:[],
}

export const mutations={
    changeCate(state,arr){
        state.list=arr
    }
}

export const actions={
    reqChangeCate(context){
        homeCate().then(res=>{
            context.commit("changeCate",res.data.list)
        })
    }
}

export const getters={
    list(state){
    return state.list
    }
}

export default {
    state,
    actions,
    mutations,
    getters,
    namespaced:true,
}